<template>

    <el-dialog title="自动生成委托合同" :visible="autoEdit" @close="dialogClose" width="75%" :close-on-click-modal="false">

        <el-form :model="ruleForm" :rules="rules" ref="editauto" label-width="auto" class="demo-ruleForm">
            <el-row :gutter="24">
                <el-col :span="12">
                    <el-form-item label="标的名称：" prop="bdzmc">
                        <el-input type="text" v-model="ruleForm.bdzmc"></el-input>
                    </el-form-item>
                    <el-form-item label="起拍价：" prop="zqpj">
                        <el-input type="text" v-model="ruleForm.zqpj"></el-input>
                    </el-form-item>
                    <el-form-item label="降低百分比：" prop="zjdbfb">
                        <el-input type="text" v-model="ruleForm.zjdbfb"></el-input>
                    </el-form-item>
                    <el-form-item label="委托评估人：" prop="wtpgr">
                        <el-input type="text" v-model="ruleForm.wtpgr" placeholder="可以为本人"></el-input>
                    </el-form-item>
                    <el-form-item label="拍卖时间：" prop="pmksrg">
                        <!-- <el-date-picker v-model="ruleForm.date1" type="datetimerange" range-separator="至"
                            start-placeholder="开始日期" end-placeholder="结束日期">
                        </el-date-picker> -->
                        <div class="block">
                            <el-date-picker
                            v-model="ruleForm.pmksrg"
                            type="datetime"
                            placeholder="选择日期和时间"
                            style="width: 100%;">
                            </el-date-picker>
                        </div>
                    </el-form-item>
                    <el-form-item label="公告时间：" prop="ggksrq">
                        <el-date-picker v-model="ruleForm.ggksrq" type="datetimerange" range-separator="至"
                            start-placeholder="开始日期" end-placeholder="结束日期">
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item label="保证金：" prop="bzj">
                        <el-input type="text" v-model="ruleForm.bzj"></el-input>
                    </el-form-item>
                    <el-form-item label="交付截止日期：" prop="jfjzrq">
                        <el-date-picker v-model="ruleForm.jfjzrq" type="datetime" placeholder="选择日期时间"
                            style="width:100%">
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item label="交付方式：" prop="jffs">
                        <el-input type="text" v-model="ruleForm.jffs"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="佣金百分比：" prop="percent2">
                        <el-input type="text" v-model="ruleForm.percent2"></el-input>
                    </el-form-item>
                    <el-form-item label="总保留价：" prop="zblj">
                        <el-input type="text" v-model="ruleForm.zblj"></el-input>
                    </el-form-item>
                    <el-form-item label="二次保留价：" prop="zecblj">
                        <el-input type="text" v-model="ruleForm.zecblj"></el-input>
                    </el-form-item>
                    <el-form-item label="拍卖方式：" prop="pmfs">
                        <el-input type="text" v-model="ruleForm.pmfs"></el-input>
                    </el-form-item>
                    <el-form-item label="评估费用承担人：" prop="pgfycdr">
                        <el-input type="text" v-model="ruleForm.pgfycdr" placeholder="可以为本人"></el-input>
                    </el-form-item>
                    <el-form-item>
                        &nbsp;
                    </el-form-item>
                    <el-form-item label="交付人：" prop="jfr">
                        <el-input type="text" v-model="ruleForm.jfr"></el-input>
                    </el-form-item>
                    <el-form-item label="交付地点：" prop="jfdd">
                        <el-input type="text" v-model="ruleForm.jfdd"></el-input>
                    </el-form-item>
                    <el-form-item label="保管费承担人：" prop="bgfcdr">
                        <el-input type="text" v-model="ruleForm.bgfcdr"></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="submitForm()" class="pull-right margin-l-25">确定
                        </el-button>
                        <el-button @click="dialogClose" class="pull-right">取消</el-button>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </el-dialog>

</template>
<script>
import { editData } from '@/api/auctionManage/entrustmentContract';
export default {
    props: {
        autoEdit: {
            type: Boolean
        },
        rowData: {
            type: Object
        }
    },
    data () {
        return {
            ruleForm: {
                // lable: '',
                // money1: '',
                // percent1: '',
                // name1: '',
                // date1: '',
                // date2: '',
                // bond: '',
                // date3: '',
                // way1: '',
                // percent2: '',
                // money2: '',
                // money3: '',
                // way2: '',
                // name2: '',
                // name3: '',
                // place: '',
                // name4: '',

            },

            // contractAdd: false,

            rules: {
                // roomId: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // lable: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // money1: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // percent1: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // name1: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // date1: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // date2: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // bond: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // date3: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // way1: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // percent2: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // money2: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // money3: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // way2: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // name2: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // name3: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // place: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
                // name4: [
                //     { required: true, message: '请输入', trigger: 'change' }
                // ],
            }
        };
    },
    methods: {

        submitForm () {
            this.$refs.editAuto.validate((valid) => {
                if (valid) {
                    // addData(this.ruleForm).then((res) => {
                    //     if(res){
                    //         console.log(res.msg);
                            this.dialogClose();
                    //     }
                    // })
                }
                else {
                    return ;
                }
            });
        },

        dialogClose () {
            this.$emit('dialogClose');
        }
    },
    mounted(){
        this.ruleForm = this.rowData;
    }

}
</script>
<!-- <style lang="less" scoped>

</style> -->